import React, { Fragment, Component } from "react";
import { StatusBar, Image, View,Dimensions } from "react-native";
var {height, width} = Dimensions.get('window');
class Launch extends Component {
  constructor() {
    super();
    this.state = {
        // timer: null,
    };
  }
  componentDidMount(){
    this.timer = setTimeout(()=>{
          console.log(this.props);
          this.props.navigation.push('main');
          console.log('1');
      },1000);
//       this.setState({timer})
   }
  componentWillUnmount(){
    this.timer && clearTimeout(this.timer);
  }
  render() {
    return (
      <Fragment>
        <View>
          <StatusBar
            backgroundColor="rgba(0,0,0,0.4)"
            barStyle="light-content"
          />
          <Image source={require('../../images/launch.jpg')} style={{width:width,height:height}}/>
        </View>
      </Fragment>
    );
  }
}
export default Launch;
